import { findBanner } from '@/api/home'
import { onMounted, ref } from 'vue'
// 定义当前轮播图的数据
export const useBanner = () => {
  const slidersData = ref([])

  // 获取轮播图的数据
  const getslidersData = async () => {
    const { result } = await findBanner()
    slidersData.value = result
  }
  onMounted(() => {
    getslidersData()
  })
  return { slidersData }
}
